<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">
<style>
    .quotationTable {
        width: 100%;
        border: 0;
        border-collapse: collapse;
    }
    .bottom {
        width: 100%;
        border: 0;
        border-collapse: collapse;
    }
    .quotationTable tr:nth-child(even) {
        background-color: white;
    }
    .bottom tr:nth-child(even) {
        background-color: white;
    }
    .quotationTable td {
        border: 1px solid #000000;;
        text-align: center;
        font-size: 13px;
        letter-spacing: 0px;
        line-height: 150%;
    }
    .bottom td {
        border: 1px solid #000000;;
        text-align: center;
        font-size: 14px;
        letter-spacing: 0px;
        line-height: 150%;
    }
    .quotationTable tbody tr td {
        font-size: 13px;
        text-align: center;
        text-verticle: center;
        line-height: 200%;
    }

    .bottom tbody tr td {
        font-size: 14px;
        text-align :center;
        text-verticle:center;
    }
    .quotationTable thead tr td {
        font-size: 13px;
        font-weight: bold;
        text-align: center;
        text-verticle: center;
    }
    .bottom thead tr td {
        font-size: 14px;
        font-weight: bold;
        text-align :center;
        text-verticle:center;
        line-height: 200%;
    }
    .info-table {
        width: 100%;
        border: 0;
        border-collapse: collapse;
    }
    .info-table tr:nth-child(even) {
        background-color: white;
    }
    .info-table td {
        border: 0px;
        text-align: center;
        font-size: 14px;
        letter-spacing: 0px;
        line-height: 180%;
    }
    .info-table tbody tr td {
        font-size: 14px;
    }
    .info-table thead tr td {
        font-size: 14px;
        font-weight: bold;
    }
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }
    .quotationTable input[type="number"] {
        -moz-appearance: textfield;
    }
    .left-part-2 {
        width: 30%;
    }
    .right-part-2 {
        width: 30%;
    }
    .middle-part {
        width: 40%;
    }
    .help p {
        text-indent: 30px;
    }
    .head-table tr:nth-child(even) {
        background-color: white;
    }
    .bottom tr:nth-child(even) {
        background-color: white;
    }
    .info-p-left {
        margin: 0;
    }
    .info-p-right {
        margin: 0;
    }
</style>
<section class="content">
    <button class="btn btn-info pull-right" style="margin-right: 10px" onclick="Print('#print')">打印</button>
    <div class="row" style="margin-top: 64px">
    <div class="col-xs-10 col-xs-push-1">
        <div  id="print">
        <table class="head-table" style="width: 100%;">
            <input type="hidden" id="quoteId" name="quoteId" th:value="${quotationMain.quoteId}">
            <input type="hidden" id="quoteTaskId" name="quoteTaskId" th:value="${quotationMain.quoteTaskId}">

                    <tbody style="width: 100%">
                    <tr style="border-width:0 0 2px 0;border-style: solid; border-color: #000;">
                        <td style="width: 100%;text-align: center" colspan="3">
                            <div style="display: inline-block;margin-top: 5px">
                                <span style="letter-spacing: 12px;display: block;line-height: 20px">辽宁忠旺机械设备制造有限公司</span>
                                <span style="display: block;font-size: 12px; letter-spacing: 8px; line-height: 20px">www.zhongwangjx.com</span>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td style="font-size: 30px; font-weight:bold; height:50px; letter-spacing: 4px;width: 100%;text-align: center"
                            colspan="3">
                            报&nbsp;&nbsp;价&nbsp;&nbsp;单
                        </td>
                    </tr>
                    </tbody>
        </table>
                <table class="info-table" style="margin:15px 0px 5px 0px">
                    <tbody>
                    <tr class="info-row">
                        <td colspan="2" style="text-align: left;font-weight: bold;font-size: 14px">
                            买方信息：
                        </td>
                        <td style="text-align: left;font-weight: bold;font-size: 14px">
                            卖方信息：
                        </td>
                    </tr>
                    <tr class="info-row">
                        <td class="left-part-2">
                            <p class="info-p-left" style="text-align:left;padding: 0"
                               th:text="${'买方名称：'+quotationMain.consumerName}"></p>
                        </td>
                        <td class="middle-part"></td>
                        <td class="right-part-2">
                            <p class="info-p-right" style="padding: 0;text-align: left"
                               th:text="${'卖方名称：'+quotationMain.supplierName}"></p>
                        </td>
                    <tr class="info-row">
                        <td class="left-part-2">
                            <p class="info-p-left" style="text-align:left;padding: 0"
                               th:text="${'买方联系人：'+quotationMain.consumerAttn}"></p>
                        </td>
                        <td class="middle-part"></td>
                        <td class="right-part-2">
                            <p class="info-p-right" style="padding: 0;text-align: left"
                               th:text="${'卖方联系人：'+quotationMain.supplierAttn}"></p>
                    </tr>
                    <tr class="info-row">
                        <td class="left-part-2">
                            <p class="info-p-left" style="text-align:left;padding: 0"
                               th:text="${'买方电话：'+quotationMain.consumerTel}"></p>
                        </td>
                        <td class="middle-part">
                        </td>
                        <td class="right-part-2">
                            <p class="info-p-right" style="padding: 0;text-align: left"
                               th:text="${'卖方电话：'+quotationMain.supplierTel}"></p>
                        </td>
                    </tr>
                    <tr class="info-row">
                        <td class="left-part-2">
                            <p class="info-p-right" style="text-align:left;padding: 0"
                               th:text="${'买方邮箱：'+quotationMain.consumerEmail}"></p>
                        </td>
                        <td class="middle-part">
                        </td>
                        <td class="right-part-2">

                            <p class="info-p-right" style="padding: 0;text-align: left"
                               th:text="${'卖方邮箱：'+quotationMain.supplierEmail}"></p>
                    </tr>
                    </tbody>
                </table>
                <table class="quotationTable" style="width: 100%" id="table">
                    <thead>
                    <tr>
                        <td colspan="13" style="font-size:14px;font-weight: normal;border: 0px;text-align: left">
                            1.价格
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 4%;BORDER-left: 1.5px solid;">序号</td>
                        <td style="width: 18%;">物料名称</td>
                        <!--<td style="width: 11%;">项目编号</td>-->
                        <td style="width: 11%;">规格型号</td>
                        <td style="width: 6%;">数量</td>
                        <td style="width: 5%;">单位</td>
                        <td style="width: 7%;">不含税</br>单价</td>
                        <td style="width: 7%;">不含税</br>总价(元)</td>
                        <td style="width: 5%;">税率%</td>
                        <td style="width: 7%;">税额</br>(元)</td>
                        <td style="width: 7%;">含税</br>单价</td>
                        <td style="width: 8%;">含税</br>总金额(元)</td>
                        <td style="width: 15.5%;">备注</td>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="QuotationSublistModel : ${qtts}">
                        <td class="td" th:text="${QuotationSublistModelStat.count}"></td>
                        <td class="td" th:text="${QuotationSublistModel.proName}"></td>
                        <!--<td class="td" th:text="${QuotationSublistModel.proCode}"></td>-->
                        <td class="td" th:text="${QuotationSublistModel.proType}"></td>
                        <td class="td" th:text="${QuotationSublistModel.proQty}"></td>
                        <td class="td" th:text="${QuotationSublistModel.proUnit}"></td>
                        <td class="td" th:text="${QuotationSublistModel.unitPrice}"></td>
                        <td class="td" th:text="${QuotationSublistModel.totalPrice}"></td>
                        <td class="td" th:text="${T(com.zhongwang.business.util.BigDecimalUtils).valueFormat(QuotationSublistModel.taxRate)}"></td>
                        <td class="td" th:text="${QuotationSublistModel.taxAmount}"></td>
                        <td class="td" th:text="${QuotationSublistModel.unitPriceTaxIncluded}"></td>
                        <td class="td" th:text="${QuotationSublistModel.totalPriceTaxIncluded}"></td>
                        <td class="td" th:text="${QuotationSublistModel.remark}"></td>
                    </tr>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="3" style="text-align:center;font-weight: bold;line-height: 200%">
                            合同总金额（元）
                        </td>
                        <td colspan="3" style="text-align:center;font-weight: bold;line-height: 200%" th:text="${quotationMain.totalAmountIncludedTax}">
                        </td>
                        <td colspan="4" style="text-align:center;font-weight: bold;line-height: 200%">
                            合同总金额大写
                        </td>
                        <td colspan="3" style="text-align:center;font-weight: bold;line-height: 200%" th:text="${'人民币'+ quotationMain.totalAmtIncTaxInWords + '（含'+ T(com.zhongwang.business.util.BigDecimalUtils).valueFormat(qtts.get(0).taxRate) +'%增值税）'}">
                        </td>
                    </tr>
                    <tr style="border:0px;line-height: 22px">
                        <td colspan="13" style="text-align: left;border:0px; font-size: 14px;line-height: 30px">
                            以上价格包含：
                            <img width="16px" height="16px" name="design" style="margi-n-top: 0px;vertical-align: middle" th:src=" ${quotationMain.design == 1 ? '/img/tick4.png': '/img/x.png'}">&thinsp;设计&nbsp;&nbsp;&nbsp;
                            <img width="16px" height="16px" name="material" style="margin-top: 0px;vertical-align: middle"th:src=" ${quotationMain.material == 1 ? '/img/tick4.png': '/img/x.png'}" >&thinsp;材料&nbsp;&nbsp;&nbsp;
                            <img width="16px" height="16px" name="manufature" style="margin-top: 0px;vertical-align: middle" th:src=" ${quotationMain.manufature == 1 ? '/img/tick4.png': '/img/x.png'}" >&thinsp;制造&nbsp;&nbsp;&nbsp;
                            <img width="16px" height="16px" name="packg" style="margin-top: 0px;vertical-align: middle"  th:src=" ${quotationMain.packg == 1 ? '/img/tick4.png': '/img/x.png'}" >&thinsp;包装&nbsp;&nbsp;&nbsp;
                            <img width="16px" height="16px" name="transport" style="margin-top: 0px;vertical-align: middle" th:src=" ${quotationMain.transport == 1 ? '/img/tick4.png': '/img/x.png'}">&thinsp;运输
                            <span name="transMethod" th:text="${quotationMain.transMethod}">
                            </span>
                            <img width="16px" height="16px" name="install" style="margin-top: 0px;vertical-align: middle" th:src=" ${quotationMain.install == 1 ? '/img/tick4.png': '/img/x.png'}">&thinsp;安装&nbsp;&nbsp;&nbsp;
                            <img width="16px" height="16px" name="debug" style="margin-top: 0px;vertical-align: middle" th:src=" ${quotationMain.debug == 1 ? '/img/tick4.png': '/img/x.png'}">&thinsp;调试
                        </td>
                    </tr>
                    <tr style="border:0px;line-height: 22px">
                        <td colspan="13" style="text-align: left;border:0px; font-size: 14px" th:text="'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+${quotationMain.excludeItem}">
                        </td>
                    </tr>
                    </tfoot>
                </table>
                <table  class="bottom" style="width: 100%; margin: 5px 0px 1px 0px">
                    <tbody>
                    <tr>
                        <td colspan="9" style="font-size:14px;font-weight: normal;border: 0px;text-align: left">
                            2.付款
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5%;BORDER-left: 1.5px solid;">序号</td>
                        <td style="width: 12%;">节点</td>
                        <td colspan="2" style="width: 30%;">条件</td>
                        <td style="width: 10%;">比例%</td>
                        <td colspan="2" style="width:15%;">金额</td>
                        <td colspan="2"style="width:22%;">方式</td>
                    </tr>
                    <tr th:each="QuotationPayment : ${payItems}">
                        <td class="td" th:text="${QuotationPaymentStat.count}"></td>
                        <td class="td" th:text="${QuotationPayment.payItemName}"></td>
                        <td colspan="2" class="td" th:text="${QuotationPayment.payCondition}"></td>
                        <td class="td" th:text="${QuotationPayment.payPercent}"></td>
                        <td colspan="2" class="td" th:text="${QuotationPayment.payAmount}"></td>
                        <td colspan="2" class="td" th:text="${QuotationPayment.payMethodName}"></td>
                    </tr>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="9"  style="font-size: 14px; border:0px;text-align: left">
                            <p id="quoteBottomDesc" name="quoteBottomDesc" readonly="readonly" th:text="${quotationMain.quoteBottomDesc}"
                               style="height: auto; padding: 0; white-space: pre-wrap; background:none;margin-bottom: 0px; max-width: 100%; min-width: 100%;">
                            </p>
                        </td>
                    </tr>
                    <tr th:if="${quotationMain.cosType == 1}">
                        <td   colspan="9" style="font-size: 14px;border: 0px;text-align: left">
                            7.审核
                        </td>
                    </tr>
                    <tr th:if="${quotationMain.cosType == 1}">
                        <td colspan="2" style="font-size: 14px;border: 0px;text-align: left">
                            制&nbsp;&nbsp;&nbsp;&thinsp;表&nbsp;&nbsp;&nbsp;&thinsp;人：
                        </td>
                        <td style="width: 15%;font-size: 14px;border: 0px;text-align: left">
                        </td>
                        <td style="font-size: 14px;border: 0px;text-align: left">
                            销售科：
                        </td>
                        <td colspan="2"style="font-size: 14px;border: 0px;text-align: left">
                        </td>
                        <td colspan="2"style="font-size: 14px;border: 0px;text-align: left">
                            机械设计院：
                        </td>
                        <td style="font-size: 14px;border: 0px;text-align: left">
                        </td>
                    </tr>
                    <tr th:if="${quotationMain.cosType == 1}">
                        <td colspan="2"style="font-size: 14px;border: 0px;text-align: left">
                            生产运营部：
                        </td>
                        <td style="width: 15%;font-size: 14px;border: 0px;text-align: left">
                        </td>
                        <td style="font-size: 14px;border: 0px;text-align: left">
                            董事长：
                        </td>
                        <td colspan="2"style="font-size: 14px;border: 0px;text-align: left">
                        </td>
                        <td colspan="2"style="font-size: 14px;border: 0px;text-align: left">
                            集团财务&nbsp;&nbsp;&nbsp;&thinsp;：
                        </td>
                        <td style="font-size: 14px;border: 0px;text-align: left">
                        </td>
                    </tr>
                    <tr>
                        <td colspan="8" style="font-size: 14px;border: 0px;text-align: left">
                        </td>
                        <td style="font-size: 14px;border: 0px;text-align: left" th:text = "${quotationMain.quoteDate == null ? '报价日期:':'报价日期:'+ #dates.format(quotationMain.quoteDate, 'yyyy-MM-dd')}">
                        </td>
                    </tr>
                </table>
        </div>
    </div>
    </div>
</section>

<div th:include="include :: footer"></div>

<script th:inline="javascript">
    $(function () {
        $('#quoteBottomDesc').html([[${quotationMain.quoteBottomDesc}]]);
    });
</script>
</body>
</html>

